<template>
<div>
    <h1>App根组件</h1>
    <hr>
    <!-- 使用自定义组件 -->
    <MyTest>
        <template #default="{msg,info}">
        <p>{{msg}}</p>
        <p>{{info.address}}</p>
        </template>
    </MyTest>
    <hr>
    <MyTable>
        <template #default="{user}">
        <td>{{user.id}}</td>
        <td>{{user.name}}</td>
        <td>
            <input type="checkbox" :checked="user.state"/>
        </td>
        </template>
    </MyTable>
</div>
</template>

<script>
import MyTest from "./MyTest.vue";
import MyTable from "./MyTable.vue";
export default{
    name:'MyApp',
    // 注册组件
    components:{
        MyTest,
        MyTable,
    }
}
</script>

<style lang="less" scoped></style>